Dialog objects

While the WidgetKit object provides some low level interface components, the DialogKit aims to provide higher level components. Not much has been implemented yet.

field\_editor(char*, Style*)
creates a field editor, used to edit a string; the first parameter is a sample string, the second can be obtained via Session::instance()->style(); the resulting string can be obtained via FieldEditor::text()
file\_chooser(char*, Style*)
creates a dialog box for selecting a file, the first parameter being the directory to begin looking in; FileChooser::selected() returns the name of the selected file

The InterViews sample application ``doc'' contains a lot of code which will eventually migrate into the main libraries (see source code in /home/grouplab/src/iv3.1/iv/src/bin/doc). The ``DialogMgr'' contains some higher level components for doing some standard sorts of dialog boxes. The code snippet below shows an example of presenting a dialog box to get a single line of input.



mgr = new DialogManager();
if ((s = (char*) mgr->ask( nil, "Prompt string", "Initial string")) != nil) {
  // do something with s
}